public class Test2 extends A {
    Y y = new Y();
    public Test2() {
        System.out.println("test2");
    }

    public void func() {
        System.out.println(super.a);
    }
    public static void main(String[] args) {
        Test2 test2 = new Test2();
        test2.func();
    }
}

class A {

    public int a = 10;
    Y y = new Y();

    public A () {
        System.out.println("A");
        a = 20;
    }
}

class Y {
    public Y() {
        System.out.println("Y");
    }
}


